<template>
  <div class="head">
    <div class="left">我的行程</div>
    <div class="right">
      <div>
        <i class="iconfont icon-shaixuan"></i>
      </div>
      <div>
        <i class="iconfont icon-tianjia"></i>
      </div>
    </div>
  </div>
  <div class="box"></div>
  <div class="schedule-list">
    <div class="item" v-for="i in 5" :key="i" @click="toPlanDetail">
      <div class="item-head">
        <div class="title">杭州西湖三日游</div>
        <div class="time">2023-10-15 至 2023-10-17</div>
      </div>
      <div class="item-content">
        <div class="item-content-photo">
          <img src="../assets/ima.jpg" alt="">
        </div>
        <div class="item-content-detail">
          <div class="bright_spot">
            行程亮点：西湖游船、雷峰塔、断桥残雪
          </div>
          <div class="local">
            <i class="iconfont icon-icons_pin"></i>
            <span>浙江省杭州市</span>
            <i class="iconfont icon-shanchu"></i>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import  { useAiResultStore } from '../store/airesult.js'
import { useRouter } from 'vue-router';
const travelContent = useAiResultStore()
const router = useRouter()
const toPlanDetail = () => {
  console.log(travelContent.getMyTravel())
  // router.push('/plandetail')
}
</script>

<style lang="less" scoped>
.head{
  z-index: 999;
  position: fixed;
  top: 0;
  height: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.37rem 0.43rem;
  width: 100%;
  box-sizing: border-box;
  background-color: #fff;
  .left{
    font-weight: 600;
    font-size: 0.53rem;
    color: #000000;
    line-height: 28px;
  }
  .right{
    display: flex;
    div:first-child{
      margin-right: 0.93rem;
    }
  }
}
.box{
  height: 1.5rem;
}
.schedule-list{
  height: calc(100vh - 3rem);
  overflow-y: scroll;
  padding: 0.21rem 0.43rem;
  .item{
    background-color: #fff;
    padding: 0.43rem;
    border-radius: 8px;
    box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.08);
    margin-bottom: 0.43rem;
    &-head{
      display: flex;
      justify-content: space-between;
      align-items: center;
      .title{
        font-weight: 600;
        font-size: 0.4rem;
        color: #000000;
        line-height: 21px;
      }
      .time{
        font-weight: 400;
        font-size: 0.4rem;
        color: #6B7280;
        line-height: 20px;
      }
    }
    &-content{
      margin-top: 0.32rem;
      height: 2.1rem;
      display: flex;
      &-photo{
        margin-right: 0.32rem;
        border-radius: 8px;
        overflow: hidden;
        width: 2.1rem;
        img{
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }
      &-detail{
        .bright_spot{
          font-weight: 400;
          font-size: 0.38rem;
          color: #636a73;
          line-height: 20px;
        }
        .local{
          margin-top: 0.21rem;
          display: flex;
          align-items: center;
          i:first-child{
            margin-right: 0.05rem;
            font-size: 0.38rem;
            color: #1f63f7;
          }
          i:nth-child(3){
            margin-left: auto;
            color: rgba(255, 0, 0, 0.546);
          }
          span{
            font-weight: 400;
            font-size: 0.38rem;
            color: #6B7280;
            line-height: 20px;
          }
        }
      }
    }
  }
}

</style>